import { List } from "antd";
import { Article } from "@/apis/shared";
import ArticleItem from "@/components/ArticleItem";

interface Props {
  authorArticleList: Article[];
  setData: (updater: (prevData: Article[]) => Article[]) => void;
}

const AuthorArticleList: React.FC<Props> = function ({
  setData,
  authorArticleList,
}) {
  return (
    <div>
      <List
        // size="small"
        dataSource={authorArticleList}
        renderItem={(item) => <ArticleItem setData={setData} item={item} />}
      />
    </div>
  );
};

export default AuthorArticleList;
